<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文本样式</title>
    <style type="text/css">
        /*
            text-transform可以用来设置文本的大小写
        */
        .p1 {
            /*none 默认值*/
            /*text-transform: none;*/


            /*单词的首字母大写， 通过空格来识别一个单词的*/
            /*text-transform: capitalize;*/

            /*uppercase: 所有的字母都大写*/
            /*text-transform: uppercase;*/

            /*lowercase: 所有的字母都小写*/
            text-transform: lowercase;

            /*
                text-decoration:用来给文本添加各种修饰，通过它可以为文本的上方、下方、或者中间添加线条
            */

            /*添加下划线*/
            /*text-decoration:underline;*/

            /*添加上划线*/
            /*text-decoration:overline;*/

            /*添加中划线，删除线*/
            /*text-decoration: line-through;*/

            /*none：默认值*/
            text-decoration: none;

            /*
                字母间距和单词间距：
                    letter-spacing用来设置字符之间的距离
                    word-spacing用来设置单词之间的距离

                    这两个属性都可以直接指定一个长度或者百分比作为值，正数代表的是增加距离，而负数代表的是减少距离
            */

            letter-spacing: 3px;
            word-spacing: 6px;

            /*
                text-align:用于设置文本的对齐方式
            */

            /*左对齐*/
            /*text-align: left;*/

            /*右对齐*/
            /*text-align: right;*/

            /*两边对齐*/
            /*text-align: justify;*/

            /*居中对齐*/
            text-align: center;

            /*
                text-indent:
                    用来设置首行缩进，该样式需要指定一个长度，并且只对第一行生效

                    一个汉字是浏览器默认是16像素，首行缩进俩字符，就是缩进了32px，结合字体大小一起使用效果更佳

                    当给它指定一个正值时，会自动向右侧缩进，当给它指定一个负值时，则会向左缩进（可以设置文字的隐藏效果）
            */
            /*text-indent: 32px;*/

            /*结合字体大小一起使用，效果更佳*/
            font-size: 12px;
            text-indent: 2em;/*结合字体的时候使用em来作为单位*/
        }



        a{
            /*a标签默认有下划线，就是说a标签的text-decoration的属性值为：underline*/

            /*去掉a标签的下划线*/
            text-decoration: none;
        }
    </style>
</head>
<body>
    <p class="p1">
        There is a wolf. He is very hungry and has no strength to find food. As he lies under a large tree, a dog sees him. The dog sees the wolf is so thin and hungry, and he feels sorry for him and says, “You are so terrible! Are you hungry?”

        “Yes,” says the wolf, “I’m hungry because you are guarding the sheep. Now I am so weak that I can’t find food. I think I will do.”

        “Why not help me?” Asks the dog, “I work regularly and I eat regularly. You could do the same. You can help me guard the sleep. In that way, I will not worry about your stealing the sleep, and you will not worry about going hungry. It’s good for us.

        The wolf thinks it over and thinks the dog is right. So they walk to the dog’s house. As they are walking, the wolf sees that only the hair of the dog’s neck is very thin. He is curious about this. So he asks the dog about it.

        “Oh, don’t worry about that,” says the dog, “It’s the place where the collar ties on the neck. My master chains me up at night,”

        “Chained up!” shouts the wolf, “Do you mean that you are chained up at night? If I come to live with you, will I be chained up at night, too?”

        “That’s night,” says the dog, “But, you’ll get used to it.”

        “But, if I am chained up, I won’t be free.” After saying this, the wolf turns round and runs away.

        The dog shouts, “Wait! Come back! I’m not free, but I’m healthy. I have good food, and a warm place to sleep. I like enjoying life. In fact, I’m freer than you are.”
    </p>

    <a href="#">我是一个下划线</a>
</body>
</html>